<?php if ($allitem <> null): ?>
    <?php foreach ($allitem as $row): ?>
        <div class="product-name">
            <h1><?php echo $catename ?> - <b> <?php echo $row->namecontent ?></b></h1>
        </div>
        <div class="wrapper-left">
            <div class="wrapper-left-top">
                <!--Slide-->

                <div class="slide-wrapper">
                    <div id="groups">
                        <div style="overflow: hidden;" class="oneByOne1">
                            <div style="left: 0px;" id="banner" class="slide">

                                <div style="left: 0px; display: block;" class="oneByOne_item" id="139">
                                    <img style="display: block;" src="<?php echo base_url('src/imagescontent/' . $row->images); ?>" width="699px" height="390px" class="bigImage animate0 bounceIn" data-animate="bounceIn" alt="<?php echo $row->namecontent ?>">
                                    <span class="slide2Txt1 animate1 fadeInUpBig">
                                        <p>
                                            <strong><?php echo $row->namecontent ?></strong>
                                        </p>
                                        <p><?php echo $row->namecontent ?></p>
                                    </span>
                                </div>
                                <div style="left: 0px; display: block;" class="oneByOne_item" id="139">
                                    <img style="display: block;" src="<?php echo base_url('src/imagescontent/' . $row->ifiles_2); ?>" width="699px" height="390px" class="bigImage animate0 bounceIn" data-animate="bounceIn" alt="<?php echo $row->namecontent ?>">
                                    <span class="slide2Txt1 animate1 fadeInUpBig">
                                        <p>
                                            <strong><?php echo $row->namecontent ?></strong>
                                        </p>
                                        <p><?php echo $row->namecontent ?></p>
                                    </span>
                                </div>
                                <div style="left: 0px; display: block;" class="oneByOne_item" id="139">
                                    <img style="display: block;" src="<?php echo base_url('src/imagescontent/' . $row->ifiles_3); ?>" width="699px" height="390px" class="bigImage animate0 bounceIn" data-animate="bounceIn" alt="<?php echo $row->namecontent ?>">
                                    <span class="slide2Txt1 animate1 fadeInUpBig">
                                        <p>
                                            <strong><?php echo $row->namecontent ?></strong>
                                        </p>
                                        <p><?php echo $row->namecontent ?></p>
                                    </span>
                                </div>

                            </div>
                            <div class="buttonArea">
                                <div style="cursor: pointer; display: none;" class="buttonCon">
                                    <a class="theButton active" rel="0">1</a>
                                    <a class="theButton" rel="1">2</a>
                                    <a class="theButton" rel="2">3</a>
                                    <a class="theButton" rel="3">4</a>
                                </div>
                            </div>
                            <div style="cursor: pointer;" class="arrowButton">
                                <div class="prevArrow"></div>
                                <div class="nextArrow"></div>  
                            </div> 
                        </div> 

                    </div>
                    <div class="wrapper-gallery">
                        <div class="gal">
                            <div id="v360z">
                                <span class="d360"></span>
                                <span class="noactive"></span>
                                <div class="border">
                                    <img title="<?php echo $row->namecontent ?>" alt="<?php echo $row->namecontent ?>" src="<?php echo base_url('src/imagescontent/thumb_' . $row->images); ?>">
                                    <span class="caption"><?php echo $row->namecontent ?></span>
                                </div>
                            </div>
                            <div class="video" data-type="0" data-slide="139" data-video="NaYRn9cSkLo">
                                <span class="noactive"></span>
                                <div class="border">
                                    <span class="iconplay"></span>
                                    <img title="<?php echo $row->namecontent ?>" alt="<?php echo $row->namecontent ?>" src="<?php echo base_url('src/imagescontent/' . $row->ifiles_2); ?>">
                                    <span class="caption"><?php echo $row->namecontent ?></span>
                                </div>
                            </div>
                            <div class="galcollection" data-type="0" data-slide="139" data-img="73">
                                <span class="noactive"></span>
                                <div class="border">
                                    <img title="<?php echo $row->namecontent ?>" alt="<?php echo $row->namecontent ?>" src="<?php echo base_url('src/imagescontent/' . $row->ifiles_3); ?>">
                                    <span class="caption"><?php echo $row->namecontent ?></span>
                                </div>
                            </div>
                        </div> 
                    </div>
                </div>
                <button onclick="tgdd360.pause('spintgdd');" id="stoptgdd360" class="displaynone">Stop Tgdd 360</button>
                <button onclick="tgdd360.spin('spintgdd');" id="starttgdd360" class="displaynone">Start Tgdd 360</button>
                <script>var slides = new Array();</script>
                <script>
                    slides[140] = {id: 140, ts: 4, tv: 1, tgi: 1, lvid: "89", lmid: "73", vicon: "", total: "8", talbum: "4", tvideo: "4", aicon: ""};
                    slides[141] = {id: 141, ts: 4, tv: 1, tgi: 1, lvid: "87", lmid: "73", vicon: "", total: "8", talbum: "4", tvideo: "4", aicon: ""};
                    slides[142] = {id: 142, ts: 4, tv: 1, tgi: 1, lvid: "88", lmid: "73", vicon: "", total: "8", talbum: "4", tvideo: "4", aicon: ""};
                    slides[139] = {id: 139, ts: 4, tv: 1, tgi: 1, lvid: "86", lmid: "73", vicon: "", total: "8", talbum: "4", tvideo: "4", aicon: ""};
                    var product = 58119;
                    var cat = 42;
                    var totalA = 1
                    var totalV = 4
                </script>

                <!--End slide-->

                <!--News-->
                <div class="news-wrapper">
                </div>
                <div class="clear"></div>


                <div class="wrapper-specification">
                    <?php echo  $row->description ?>
                </div>
                <div class="clear"></div>
                <div id="productinfo" class="displaynone">
                   
                </div>


                <!--End news-->
                <!--Information-->
                <div class="information-detail">
                     <div id="productinfo-content">
                       <?php echo $row->features ?>
                        <div class="clear"></div>
                    </div>
                     
                </div>
                <!--End information-->
            </div>
            <!--Comment-->
            <div class="wrapper-left-bottom">
                <div class="product-feature-list-wrapper photo-video-wrapper clearfix" style="margin-bottom: 0;">
                    <h3 class="clearfix" style="display: none">Nhận Xét</h3>
                </div>
                <div class="spec-detail-wrapper photo-album-wrapper clearfix">
                    <div id="comment" cmtcategoryid="2" siteid="0" detailid="58119" cateid="42" urlpage="/dtdd/nokia-lumia-520" nameproduct="Nokia Lumia 520">

                        <div id="comment-wrapper"> 
                            <!-- Begin Facebook Plugin-->
                            <div id="fb-root"></div>
                            <script>(function(d, s, id) {
                                            var js, fjs = d.getElementsByTagName(s)[0];
                                            if (d.getElementById(id))
                                                return;
                                            js = d.createElement(s);
                                            js.id = id;
                                            js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
                                            fjs.parentNode.insertBefore(js, fjs);
                                        }(document, 'script', 'facebook-jssdk'));</script>
                            <div class="fb-comments" data-href="<?php echo $facebook_link; ?>" data-width="670" data-numposts="5" data-colorscheme="light"></div>
                            <!--  End Facebook Plugin-->

                        </div>
                    </div> 
                </div>
            </div>
            <!--End comment-->
        </div>
        <div class="wrapper-right">

            <div class="wrapper-normal-sell"> 
                <div class="price"> 
                    <span class="mprice">
                        <a href="javascript:void(0);" title="Giá bán <?php echo $row->namecontent ?>">
                            Giá bán: <?php echo number_format($row->coins) ?> ₫
                        </a>
                    </span>
                </div>
                <div class="promotion">
                </div> 
<!--                <ul class="action-button">
                    <li><a href="#" class="buyNow radius" title=" " >MUA NGAY, GIAO TẬN NƠI<span>(xem hàng, không mua không sao)</span></a></li>
                    <li><a href="#" title=" " class="installment radius">MUA TRẢ GÓP<span>(từ 210.000đ/tháng)</span></a></li>
                    <li><a href="#" class="orderatstore radius" title=" "  >ĐẶT MUA TẠI CỬA HÀNG</a></li>

                </ul>-->
                <div class="deliveryinfo clr">
                    <ul class="buy-call">
                        <li>Gọi điện thoại đặt mua:
                            <strong>
                                <?php if ($meta1 <> NULL): ?>
                                    <?php foreach ($meta as $row): ?>
                                        <?php echo $row->hotline_1; ?> 
                                    <?php endforeach; ?>
                                <?php endif; ?>
                            </strong></li>
                    </ul>
                    <ul>
                        <li>Nhận hàng trong <strong>30 phút </strong> tại <strong>Hà Nội</strong></li> 
                    </ul>
                </div>
            </div>



            <!--End Kịch bản bán hàng-->

            <!--Compare products-->

            <!--End compare products-->
            <!--News products-->
            <div class="wrapper-news">
                <h4><b>Tin tức</b> </h4>
                <ul class="news">
                    <?php foreach($allnews as $row):?>
                    <li>
                        <a target="_blank" href="<?php echo site_url('news/'.mb_strtolower(url_title(removesign($row->title.'-'.$row->id)))).'.html'?>" title="Hàng " độc"="" lumia="" 520="" phiên="" bản="" ssc="" napoli="" đẹp="" mê="" hồn"="">
                           <img src="<?php echo base_url('src/news/thumb_'.$row->images); ?>" alt="Hàng " độc"="" lumia="" 520="" phiên="" bản="" ssc="" napoli="" đẹp="" mê="" hồn"="" height="40" width="60"></a>
                        <a target="_blank" href="<?php echo site_url('news/'.mb_strtolower(url_title(removesign($row->title.'-'.$row->id)))).'.html'?>" title="Hàng " độc"="" lumia="" 520="" phiên="" bản="" ssc="" napoli="" đẹp="" mê="" hồn"="">
                           <span class="title"><?php echo $row->title?></span>
                        </a>
                        <span class="caption"><?php echo $row->createdate?></span>
                    </li>
                    <?php endforeach;?>
                </ul>
                <div class="clear"></div>
            </div>
            

            <!--End news products-->

            <!--Accessories products-->


            <!--End accessories products-->
            <!--Old products-->

            <!--End old products-->
            <!--Game App products--><!--End Game App products-->
            <!--Tips-->
            <div class="wrapper-tips">
                <h4><b>SMARTPHONE LÀM ĐƯỢC GÌ</b> CHO BẠN</h4>
                <ul>
                    <li>Gọi điện, nhắn tin trong nước/quốc tế miễn phí</li>
                    <li>Giúp bạn tìm đường đi, địa điểm ăn chơi</li>
                    <li>Nhắc ngày sinh nhật của người thân</li>
                    <li>Chặn cuộc gọi hoặc tin nhắn từ bất kỳ ai</li>
                </ul>
                <a href="<?php echo site_url(); ?>tin-tuc/tips-su-dung-smartphone/1042" title="smartphone làm được gì">Xem tất cả »</a>
            </div>            <!--End Tips-->
            
            <div class="clear"></div>
            <div class="wrapper-news">
                <h4><b>Sản phẩm cùng loại</b> </h4>
                <ul class="news">
                    <?php foreach($relateitem as $row):?>
                    <li>
                        <a target="_blank" href="<?php echo site_url('product/'.mb_strtolower(url_title(removesign($row->namecontent.'-'.$row->id)))).'.html'?>" title="Hàng " độc"="" lumia="" 520="" phiên="" bản="" ssc="" napoli="" đẹp="" mê="" hồn"="">
                           <img src="<?php echo base_url('src/imagescontent/thumb_'.$row->images);?>" alt="Hàng "   height="40" width="60"></a>
                        <a target="_blank" href="<?php echo site_url('product/'.mb_strtolower(url_title(removesign($row->namecontent.'-'.$row->id)))).'.html'?>" title="Hàng " >
                           <span class="title"><?php echo $row->namecontent; ?></span>
                        </a>
                        <span class="caption"><?php echo number_format($row->coins);?>₫</span>
                    </li>
                    <?php endforeach;?>
                </ul>
                <div class="clear"></div>
            </div>
        </div>

    <?php endforeach; ?>
<?php endif; ?>

